<template>
  <view class="g-footer">
    <view>
      <text v-if="info.service">客服电话：{{ info.service }}</text>
      <text v-if="info.onlineTime">（在线时间：{{ info.onlineTime }}）</text>
    </view>
    <view>{{ info.name }}</view>
  </view>
</template>

<script setup lang="ts">
import { ref, onMounted } from "vue";
import { getTerminal } from "../../request/api";

const info = ref<any>({});

onMounted(() => {
  getInfo();
});

// 获取厂家信息
const getInfo = () => {
  let key = "mc_cabinet_manufacturer";
  getTerminal(key).then((res: any) => {
    info.value = JSON.parse(res.data.value);
    uni.setStorageSync(key, info.value);
  });
};
</script>

<style scoped>
.g-footer {
  position: fixed;
  bottom: 34.75rpx;
  left: 0;
  width: 100%;
  height: 100rpx;
  font-family: Source Han Sans;
  font-weight: 400;
  font-size: 25rpx;
  color: #3d3d3d;
  line-height: 36rpx;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
</style>
